<?php

namespace Drinkiit\BlogBundle\Tests\Entity;

use Drinkiit\BlogBundle\Entity\Article_commande;
use Drinkiit\BlogBundle\Entity\Article;
use Drinkiit\BlogBundle\Entity\Commande;

use Symfony\Bundle\FrameworkBundle\Test\WebTestCase;

class Article_commandeTest extends WebTestCase
{
	protected $article_commande;
	protected $article;
	protected $commande;

	public function setUp()
	{
		parent::setUp();
		$this->article_commande = new Article_commande();
		$this->article = new Article();
		$this->commande = new Commande();
		
	}
	
	// Tests unitaires concernant l'ORM

	public function testgetTypeArticle()
	{
		$this->article_commande->setTypeArticle($this->article);
		$this->assertEquals($this->article->getId(), $this->article_commande->getTypeArticle()->getId());
	}
	
	public function testgetArticleCommande()
	{
		$this->article_commande->setArticleCommande($this->commande);
		$this->assertEquals($this->commande->getId(), $this->article_commande->getArticleCommande()->getId());

	}
}

